import { Rule, RuleType } from '@midwayjs/decorator';
import { BasePageDto } from '../../mall/dto/base';

export class CustomerPageDto extends BasePageDto {
  @Rule(RuleType.number().required())
  id: number;
}

export class CreateCustomerDto {
  @Rule(RuleType.string().required())
  name: string;

  @Rule(RuleType.string().required())
  pwd: string;
}

export class UpdateCustomerDto {
  @Rule(RuleType.number().required())
  id: number;

  name: string;
  pwd: string;
  nickname: string;
  avatar: string;
  phone: string;

  @Rule(RuleType.string().email())
  email: string;

  sex: 'man' | 'woman';
}
